home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / std / c / 96 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  1.8 KB

  1. Path: sdrc.com!thor!scjones
  2. From: larry.jones@sdrc.com (Larry Jones)
  3. Newsgroups: comp.std.c
  4. Subject: Re: Meaning of __STDC__?
  5. Date: 13 Jan 1996 16:32:51 GMT
  6. Organization: SDRC Engineering Services
  7. Distribution: world
  8. Message-ID: <4d8mrj$p4v@info1.sdrc.com>
  9. References: <4d6673$8to@mailgate.bridgewater.ne.hcc.com>
  10. NNTP-Posting-Host: thor.sdrc.com
  11. Originator: scjones@thor
  12.  
  13. In article <4d6673$8to@mailgate.bridgewater.ne.hcc.com>, kennedy@   (John W Kennedy) writes:
  14. > Is there an official statement as to what __STDC__ means?  Does it mean "This
  15. > compiler (in its current operating mode) fully supports ANSI Standard C," or
  16. > does it mean "This compiler (in its current operating mode) disallows all
  17. > extensions to ANSI Standard C."?  In my opinion, common practice and the
  18. > Rationale both support the former, rather than the latter, but is
  19. > there an official ruling?
  20.  
  21. It means that the compiler defines __STDC__.  :-)
  22.  
  23. A conforming compiler is required to define it as 1.  A non-conforming
  24. compiler isn't bound by the requirements of the standard, so it can
  25. define it any way it likes or not at all.  Existing implementations are
  26. all over the map:  I know of compilers that always define it (1 if the
  27. compiler is invoked in strictly conforming mode, 0 otherwise),
  28. compilers that define it only in strictly conforming mode, and others
  29. that define it in both strictly conforming and extended modes.  I even
  30. know of one particularly perverse implementation (which is,
  31. fortunately, long gone by now) whose sole ANSI feature was defining
  32. __STDC__.
  33.  
  34. The bottom line is, despite the committee's good intentions, __STDC__
  35. is essentially useless.
  36. ----
  37. Larry Jones, SDRC, 2000 Eastman Dr., Milford, OH  45150-2789  513-576-2070
  38. larry.jones@sdrc.com
  39. I can do that!  It's a free country!  I've got my rights! -- Calvin
  40.